<?xml version="1.0" encoding="UTF-8"?>
<dxl:DXLMessage xmlns:dxl="http://greenplum.com/dxl/2010/12/">
  <dxl:Comment><![CDATA[
      Objective: Max card for full outer join should be the maximum of max card
      of left and right child. If both of them are zero, max card will be zero
      and we can collapse the query to a Const Table Get with False filter.
      
      Query:
      WITH cte1 AS                                                                                                                                                                                                                                  (SELECT a FROM (VALUES (1),(2)) AS x(a) LIMIT 0),                                                                                                                                                                                             cte2 AS (SELECT b FROM (VALUES (2)) AS x(b) LIMIT 0)                                                                                                                                                                                         SELECT a, b FROM cte1 FULL JOIN cte2 ON true;
       a | b
      ---+---
      (0 rows)
      
      Plan:

                      QUERY PLAN
      ------------------------------------------
       Result  (cost=0.00..0.00 rows=0 width=8)
         One-Time Filter: false
       Optimizer status: PQO version 3.18.0
  		]]> 
  </dxl:Comment>
  <dxl:Thread Id="0">
    <dxl:OptimizerConfig>
      <dxl:EnumeratorConfig Id="0" PlanSamples="0" CostThreshold="0"/>
      <dxl:StatisticsConfig DampingFactorFilter="0.750000" DampingFactorJoin="0.000000" DampingFactorGroupBy="0.750000" MaxStatsBuckets="100"/>
      <dxl:CTEConfig CTEInliningCutoff="0"/>
      <dxl:WindowOids RowNumber="7000" Rank="7001"/>
      <dxl:CostModelConfig CostModelType="1" SegmentsForCosting="3">
        <dxl:CostParams>
          <dxl:CostParam Name="NLJFactor" Value="1024.000000" LowerBound="1023.500000" UpperBound="1024.500000"/>
        </dxl:CostParams>
      </dxl:CostModelConfig>
      <dxl:Hint JoinArityForAssociativityCommutativity="18" ArrayExpansionThreshold="100" JoinOrderDynamicProgThreshold="10" BroadcastThreshold="10000000" EnforceConstraintsOnDML="false"/>
      <dxl:TraceFlags Value="102001,102002,102003,102074,102120,102144,103001,103003,103014,103015,103022,103027,103029,103033,104003,104004,104005,105000"/>
    </dxl:OptimizerConfig>
    <dxl:Metadata SystemIds="0.GPDB">
      <dxl:Type Mdid="0.16.1.0" Name="bool" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="true" Length="1" PassByValue="true">
        <dxl:EqualityOp Mdid="0.91.1.0"/>
        <dxl:InequalityOp Mdid="0.85.1.0"/>
        <dxl:LessThanOp Mdid="0.58.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.1694.1.0"/>
        <dxl:GreaterThanOp Mdid="0.59.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.1695.1.0"/>
        <dxl:ComparisonOp Mdid="0.1693.1.0"/>
        <dxl:ArrayType Mdid="0.1000.1.0"/>
        <dxl:MinAgg Mdid="0.0.0.0"/>
        <dxl:MaxAgg Mdid="0.0.0.0"/>
        <dxl:AvgAgg Mdid="0.0.0.0"/>
        <dxl:SumAgg Mdid="0.0.0.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
      <dxl:Type Mdid="0.20.1.0" Name="Int8" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="true" Length="8" PassByValue="true">
        <dxl:EqualityOp Mdid="0.410.1.0"/>
        <dxl:InequalityOp Mdid="0.411.1.0"/>
        <dxl:LessThanOp Mdid="0.412.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.414.1.0"/>
        <dxl:GreaterThanOp Mdid="0.413.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.415.1.0"/>
        <dxl:ComparisonOp Mdid="0.351.1.0"/>
        <dxl:ArrayType Mdid="0.1016.1.0"/>
        <dxl:MinAgg Mdid="0.2131.1.0"/>
        <dxl:MaxAgg Mdid="0.2115.1.0"/>
        <dxl:AvgAgg Mdid="0.2100.1.0"/>
        <dxl:SumAgg Mdid="0.2107.1.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
      <dxl:Type Mdid="0.23.1.0" Name="int4" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="true" Length="4" PassByValue="true">
        <dxl:EqualityOp Mdid="0.96.1.0"/>
        <dxl:InequalityOp Mdid="0.518.1.0"/>
        <dxl:LessThanOp Mdid="0.97.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.523.1.0"/>
        <dxl:GreaterThanOp Mdid="0.521.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.525.1.0"/>
        <dxl:ComparisonOp Mdid="0.351.1.0"/>
        <dxl:ArrayType Mdid="0.1007.1.0"/>
        <dxl:MinAgg Mdid="0.2132.1.0"/>
        <dxl:MaxAgg Mdid="0.2116.1.0"/>
        <dxl:AvgAgg Mdid="0.2101.1.0"/>
        <dxl:SumAgg Mdid="0.2108.1.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
    </dxl:Metadata>
    <dxl:Query>
      <dxl:OutputColumns>
        <dxl:Ident ColId="4" ColName="a" TypeMdid="0.23.1.0"/>
        <dxl:Ident ColId="5" ColName="b" TypeMdid="0.23.1.0"/>
      </dxl:OutputColumns>
      <dxl:CTEList>
        <dxl:LogicalCTEProducer CTEId="1" Columns="1">
          <dxl:LogicalLimit>
            <dxl:SortingColumnList/>
            <dxl:LimitCount>
              <dxl:ConstValue TypeMdid="0.20.1.0" Value="0"/>
            </dxl:LimitCount>
            <dxl:LimitOffset/>
            <dxl:LogicalConstTable>
              <dxl:Columns>
                <dxl:Column ColId="1" Attno="1" ColName="column1" TypeMdid="0.23.1.0"/>
              </dxl:Columns>
              <dxl:ConstTuple>
                <dxl:Datum TypeMdid="0.23.1.0" Value="1"/>
              </dxl:ConstTuple>
              <dxl:ConstTuple>
                <dxl:Datum TypeMdid="0.23.1.0" Value="2"/>
              </dxl:ConstTuple>
            </dxl:LogicalConstTable>
          </dxl:LogicalLimit>
        </dxl:LogicalCTEProducer>
        <dxl:LogicalCTEProducer CTEId="2" Columns="3">
          <dxl:LogicalLimit>
            <dxl:SortingColumnList/>
            <dxl:LimitCount>
              <dxl:ConstValue TypeMdid="0.20.1.0" Value="0"/>
            </dxl:LimitCount>
            <dxl:LimitOffset/>
            <dxl:LogicalConstTable>
              <dxl:Columns>
                <dxl:Column ColId="3" Attno="1" ColName="column1" TypeMdid="0.23.1.0"/>
              </dxl:Columns>
              <dxl:ConstTuple>
                <dxl:Datum TypeMdid="0.23.1.0" Value="2"/>
              </dxl:ConstTuple>
            </dxl:LogicalConstTable>
          </dxl:LogicalLimit>
        </dxl:LogicalCTEProducer>
      </dxl:CTEList>
      <dxl:LogicalCTEAnchor CTEId="1">
        <dxl:LogicalCTEAnchor CTEId="2">
          <dxl:LogicalJoin JoinType="Full">
            <dxl:LogicalCTEConsumer CTEId="1" Columns="4"/>
            <dxl:LogicalCTEConsumer CTEId="2" Columns="5"/>
            <dxl:ConstValue TypeMdid="0.16.1.0" Value="true"/>
          </dxl:LogicalJoin>
        </dxl:LogicalCTEAnchor>
      </dxl:LogicalCTEAnchor>
    </dxl:Query>
    <dxl:Plan Id="0" SpaceSize="0">
      <dxl:Result>
        <dxl:Properties>
          <dxl:Cost StartupCost="0" TotalCost="0.000000" Rows="0.000000" Width="8"/>
        </dxl:Properties>
        <dxl:ProjList>
          <dxl:ProjElem ColId="2" Alias="a">
            <dxl:ConstValue TypeMdid="0.23.1.0" IsNull="true" IsByValue="true"/>
          </dxl:ProjElem>
          <dxl:ProjElem ColId="3" Alias="b">
            <dxl:ConstValue TypeMdid="0.23.1.0" IsNull="true" IsByValue="true"/>
          </dxl:ProjElem>
        </dxl:ProjList>
        <dxl:Filter/>
        <dxl:OneTimeFilter>
          <dxl:ConstValue TypeMdid="0.16.1.0" Value="false"/>
        </dxl:OneTimeFilter>
      </dxl:Result>
    </dxl:Plan>
  </dxl:Thread>
</dxl:DXLMessage>
